import matplotlib.pyplot as plt
import numpy as np
x_a=np.arange(0,2*np.pi,0.1)
y_a=np.sin(x_a)
x_l=np.linspace(0,2*np.pi,100)
y_l=np.sin(x_l)
plt.figure(figsize=(12,4))
plt.subplot(1,2,1)
plt.plot(x_a,y_a,label='arange')
plt.title('Using arange()')
plt.legend()
plt.subplot(1,2,2)
plt.plot(x_l,y_l,label='linspace')
plt.title('Using linspace()')
plt.legend()
plt.show()